<!DOCTYPE html>
<html lang="en">
<head>
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
    <meta name="format-detection"content="telephone=no, email=no" />
    <meta name="apple-mobile-web-app-capable" content="yes" /><!-- 删除苹果默认的工具栏和菜单栏 -->
    <meta name="apple-mobile-web-app-status-bar-style" content="black" /><!-- 设置苹果工具栏颜色 -->
    <meta name=”renderer” content="ie-comp">
    <meta name=”renderer” content=”ie-stand”>
    <meta name="renderer" content="webkit"> 
    <meta name="keywords" content="耀盛中国,耀盛智投,理财产品,智选财富,耀盛智投官网"/>
    <meta name="description" content="耀盛智投为耀盛中国旗下理财产品智选平台。专注于为大众富裕阶层、精英个人、中产阶级家庭、合规机构等提供定制化资产配置咨询推荐服务，帮助客户实现财富的增值。" />
    <title>保险详情</title>
    <script src="../../lib/js/ftSize.js"></script>
    <link rel="stylesheet" href="../../lib/css/_base.css">
    <link rel="stylesheet" type="text/css" href="../../lib/css/InsuranceDetails.css">
    <link rel="stylesheet" href="../../lib/css/publicBubb.css">
</head>
<body>
        <h1 class="rem90R"><img src="../../lib/images/left.png" class="leftImg" onClick="prevAttectation()"><span id="projectname"></span></h1>
<!-- <h1 class="rem90" ></h1> -->
<section class="P_list product-main" id="insurance-details-business">
    <!-- 头图 -->
    <dl id="insurance-details-upper">
       <!--   -->
    </dl>
    <p class="bx_introduce" id="insurance-details-small">【自费全能报】 意外身故、伤残最高100万，医疗10万0免赔，、伤残最高100万，医疗10万0免赔，、伤残最高100万，医疗10万0免赔，不限医保， 投保年龄：0-65周岁</p>
    <!-- 头图 -->
    <!-- 底图 -->
    <div id="product-introduction"><img src="../../lib/images/left-tiao.png"><span>产品介绍</span></div>
    <div class="bx_bottom_img" id="insurance-detailsImage">
        
    </div>
    <!-- 底图 -->
    <!--  脚 -->
    <div class="bx_now">
        <ul class="bx_btn_now">
                <li id="insurance-details-second"><!-- <p><i>保费</i><span>140</span><em>元起</em></p> --></li>
           <!--  <li><p><em>保费</em><span>140</span><i>元起</i></p></li> -->
            <li id="ImmediatelyInsure" onClick="goImmediately()">立即投保</li>
        </ul>
    </div>
  
    <!-- 弹窗 -->   
    <div class="maskWrap" id="insuanceDetapage" style="display: none;">
            <div class="maskLaying">
                 <div class="maskImag" style="margin:0.58rem auto 0; "></div>
                <div class="maskTitleinsur">您将离开本站，跳转到合作机构网站进行投保。</div>
                <div class="maskContente" style=" margin:.1rem auto .24rem;">提示：投保成功后，记得返回本站，可在“我的账户-我的保险”页面查看保单详情</div>
                <div class="maskbtnGroup">
                    <div id="continueInsure" >
                          <!--   <a href="javascript:;" style="margin:0 auto;"> <span class="winBg" style="margin:.1rem auto 0;">继续投保</span></a> -->
                    </div>
                   
                    <a href="javascript:;" onClick="insuranceDHide()"><span>我再看看</span></a>
                </div>  
            </div>
        </div>
</section>
<script src="../../lib/js/jquery.min.js"></script>    
<script src="../../lib/js/public-header.js"></script> 
<script>
    let immedInsure='';
    function insurdetailJson() {
        var url = window.location.search;
       // window.sessionStorage.setItem('wpuserToken');
        let wpinsureId=''
        if (url.indexOf("?") != -1) {
            var str = url.substr(1)
            strs = str.split("&");
            for (i = 0; i < strs.length; i++) {
                wpinsureId = strs[i].split("=")[1];
                window.sessionStorage.setItem('wpinsureId',wpinsureId);
            }
        }
        wpinsureId= window.sessionStorage.getItem('wpinsureId')
        var json = {
            "token":" ",
            "clientInfo":"W,100,IE8",
            "requestTime": formatDateTime(startTime),
            "faceCode":"insurance/getInsuranceInfo",//保险详情
            "body":{"id":wpinsureId},
        }
        return json;
    }
    
    $.ajax({  
        type: "POST",
        url: httpServer+"insurance/getInsuranceInfo",
        headers:{
            'Access-Control-Allow-Origin':'*'
        }, 
        contentType: "application/json; charset=utf-8",
        data: JSON.stringify(insurdetailJson()),
        dataType: "json",
        success: function (insurdetailShow) { 
            if(insurdetailShow.resCode!='0' ){
                //twoError(insurdetailShow)
            }else{
                let insurancedetList='',premium='',projectTermType='';
                immedInsure=insurdetailShow.body.payLink;//购买链接地址
                if(insurdetailShow.body.premiumType=='1' || insurdetailShow.body.projectTermType=='1'){
                    premium=`<em>元</em>`;
                    projectTermType=`<i>`+insurdetailShow.body.projectTerm+`天</i>`
                }else if(insurdetailShow.body.premiumType=='2' || insurdetailShow.body.projectTermType=='2'){
                    premium=`<em>元起</em>`;
                    projectTermType=`<i>`+insurdetailShow.body.projectTerm+`年</i>`
                } 
                if(insurdetailShow.body!=[] ){
                    $('#projectname').text(insurdetailShow.body.projectName)
                    insurancedetList+=`<dt><img src="`+insurdetailShow.body.imageUrl+`" alt="`+insurdetailShow.body.projectName+`-耀盛财富"></dt>
                        <dd><ul class="bx_dl_list">
                            <li><img src="../../lib/images/dui.png">
                                <span>保障期限</span>`+projectTermType+`
                            </li>
                            <li><img src="../../lib/images/dui.png">
                                <span>保障额度</span><i>`+insurdetailShow.body.insuredAmount+`万元</i>
                            </li>
                            <li><img src="../../lib/images/dui.png">
                                <span>缴费方式</span><i>`+insurdetailShow.body.payType+`</i>
                            </li>
                            </ul>
                        </dd>`
                }
                $('#insurance-details-upper').html(insurancedetList)  
                $('#insurance-details-small').text(insurdetailShow.body.projectInfo)
                $('#insurance-detailsImage').html(`<img src="`+insurdetailShow.body.productIntroductionUrl+`">`);
                $("#insurance-details-second").html(`<p><i>保费</i><span>`+insurdetailShow.body.premium+`</span>`+premium+`</p>`)
            }
        },
        error: function(error){  
            console.log(error,2);  
        }    
    }); 
    function insuranceDHide(){
        $('#insuanceDetapage').hide()
    }
    function goImmediately(){
        if( window.sessionStorage.getItem('wpuserInfo' )!=null ){
            $('#insuanceDetapage').show()
            $('#continueInsure').html(` <a href="`+immedInsure+`" style="margin:0 auto;"> <span class="winBg" style="margin:.1rem auto 0;">继续投保</span></a>`)
           /*  window.setTimeout(function(){
                window.location.href=immedInsure;
            },3000); */
        }else{
            window.sessionStorage.setItem('wprouterFrom','/InsuranceDetails/index.html')
            window.location.href='../../login/login.html';
        }

       /*   */
       
    }

//})

</script>
</body>
</html>